home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 6151 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.8 KB

  1. Path: newshost.lanl.gov!tanmoy
  2. From: tanmoy@qcd.lanl.gov (Tanmoy Bhattacharya)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Initialising structure members - help please!
  5. Date: 22 Feb 1996 16:19:36 GMT
  6. Organization: Los Alamos National Laboratory
  7. Message-ID: <TANMOY.96Feb22091936@qcd.lanl.gov>
  8. References: <4gb8hn$3m8@news.mistral.co.uk> <4gflijINN8hi@keats.ugrad.cs.ubc.ca>
  9. NNTP-Posting-Host: qcd.lanl.gov
  10. Mime-Version: 1.0
  11. Content-Type: text
  12. In-reply-to: c2a192@ugrad.cs.ubc.ca's message of 21 Feb 1996 09:42:43 -0800
  13.  
  14. In article <4gflijINN8hi@keats.ugrad.cs.ubc.ca> c2a192@ugrad.cs.ubc.ca
  15. (Kazimir Kylheku) writes: 
  16. <snip>
  17. cKK: Your compiler's message is not strictly correct. The left side of the
  18. cKK: expression _is_ an lvalue, because it refers to an object, and it is
  19. cKK: addressable. But it is not a _modifiable_ lvalue. Like an array,
  20. a function is 
  21. cKK: also an lvalue, but it isn't modifiable:
  22. cKK: 
  23. cKK:     [Assignment Expressions] require an lvalue as a left operand, and the
  24. cKK:     lvalue must be modifiable: it must not be an array, and must not have
  25. cKK:     an incomplete type, or be a function. (K&R2 A7.17)
  26.  
  27. Hmmm... my quoting style is now less readable but hopefully less
  28. confusing? 
  29.  
  30. The ANSI standard does not define a function to be an lvalue, because
  31. it does not define a function to be an object. But, you are basically
  32. correct. 
  33.  
  34. Cheers
  35. Tanmoy
  36. --
  37. tanmoy@qcd.lanl.gov(128.165.23.46) DECNET: BETA::"tanmoy@lanl.gov"(1.218=1242)
  38. Tanmoy Bhattacharya O:T-8(MS B285)LANL,NM87545 H:#9,3000,Trinity Drive,NM87544
  39. Others see <gopher://yaleinfo.yale.edu:7700/00/Internet-People/internet-mail>,
  40. <http://alpha.acast.nova.edu/cgi-bin/inmgq.pl>or<ftp://csd4.csd.uwm.edu/pub/
  41. internetwork-mail-guide>. -- <http://nqcd.lanl.gov/people/tanmoy/tanmoy.html>
  42. fax: 1 (505) 665 3003   voice: 1 (505) 665 4733    [ Home: 1 (505) 662 5596 ]
  43.